﻿using System;
using System.Xml.Linq;
using HigLabo.Net.Extensions;
using System.Collections.Generic;
using Newtonsoft.Json.Linq;



namespace HigLabo.Net.Twitter
{
    /// <summary>
    /// 
    /// </summary>
    public class Result : ResponseObject
    {
        /// <summary>
        /// 
        /// </summary>
        public String Token { set; get; }
        /// <summary>
        /// 
        /// </summary>
        public PlaceCollection Places { set; get; }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="jsonText"></param>
        public Result(String jsonText)
        {
            this.SetProperty(jsonText);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="jsonText"></param>
        public override void SetProperty(string jsonText)
        {
            var d = this.SetData(jsonText);

            this.Token = d.ToString("token");
            this.Places = new PlaceCollection(d.ToString("places"));
        }
    }
}
